﻿using System;

namespace TcpSocketTaskDemo
{
    internal interface ITester
    {
        void RunAsServer();
        void RunAsClient();
    }

    class Program
    {
        static void Main(string[] args)
        {
            ITester tester = null;
            tester = new Echo.Tester("127.0.0.1", 7027);

            if (args[0].Equals("server", StringComparison.OrdinalIgnoreCase))
                tester.RunAsServer();
            else if (args[0].Equals("client", StringComparison.OrdinalIgnoreCase))
                tester.RunAsClient();
            else
                throw new ArgumentOutOfRangeException("un-recognized startup option");
        }// Main
    }
}
